import axios from 'axios'

const service = axios.create({
    // baseURL:process.env.VUE_APP_BASE_URL
})

//  配置请求动画
service.interceptors.request.use(config=>{
    console.log('进行请求')
    return config
})

service.interceptors.response.use(result=>{
    console.log('请求回来',result)
    let {data:res}  = result
    if(res.code!==200){
        return console.log('获取数据失败');
    }
    return result
})

export default service